import java.util.Scanner;

public class demo05 {
    //Fibonacci 数列与黄金分割
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        if(n<20){
            double num1=fib(n);
            double num2=fib(n+1);
            double num=num1/num2;
            System.out.printf("%.8f",num);
        }else{
            System.out.println(0.61803399);
        }
    }
    public static int fib(int n){
        if(n==1||n==2){
            return 1;
        }
        return fib(n-1)+fib(n-2);
    }
}
